var lineChartData = {
    // x坐标数据
   labels:["周一","周二","周三","周四","周五","周六","周日"],
   datasets:[
   {
      //统计表的背景颜色
      fillColor:"rgba(255,255,255,1)",
      //统计表画笔颜色
      strokeColor:"rgba(0,0,0,1)",
      // 点的颜色
      pointColor:"rgba(155,39,39,1)",
      // 点边框的颜色
      pointStrokeColor:"#fff",
      // 鼠标触发时点的颜色
      pointHighlightFill:"#fff",
      // 鼠标触发时点边框的颜色
      pointHighlightStroke:"rgba(220,220,220,1)",
      // Y坐标数据
      data:[1,2,3,4,5,5,6,7,8,8,9,9]
  },
   {
    //统计表的背景颜色
      fillColor:"rgba(255,255,255,0)",
      //统计表画笔颜色
      strokeColor:"rgba(92,184,92,1)",
      // 点的颜色
      pointColor:"rgba(23,126,23,1)",
      // 点边框的颜色
      pointStrokeColor:"#fff",
      // 鼠标触发时点的颜色
      pointHighlightFill:"#fff",
      // 鼠标触发时点边框的颜色
      pointHighlightStroke:"rgba(151,187,205,1)",
      // Y坐标数据
      data:[2,2,1,4,2,4,5,7,8,8,4,3]
   }

   ]

}
window.onload = function(){
    var ctx = document.getElementById("canvas").getContext("2d");
    window.myLine =  new Chart(ctx).Line(lineChartData,{
       responsive:true
    });
}


      var ctx = document.getElementById("myChart");
      var myChart = new Chart(ctx, {
          type: 'bar',
          data: {
              labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
              datasets: [{
                  label: '柱状图(www.chartjs.org)',
                  data: [12, 19, 3, 5, 2, 3],
                  backgroundColor: [
                      'rgba(255, 99, 132, 0.2)',
                      'rgba(54, 162, 235, 0.2)',
                      'rgba(255, 206, 86, 0.2)',
                      'rgba(75, 192, 192, 0.2)',
                      'rgba(153, 102, 255, 0.2)',
                      'rgba(255, 159, 64, 0.2)'
                  ],
                  borderColor: [
                      'rgba(255,99,132,1)',
                      'rgba(54, 162, 235, 1)',
                      'rgba(255, 206, 86, 1)',
                      'rgba(75, 192, 192, 1)',
                      'rgba(153, 102, 255, 1)',
                      'rgba(255, 159, 64, 1)'
                  ],
                  borderWidth: 1
              }]
          },
          options: {
              scales: {
                  yAxes: [{
                      ticks: {
                          beginAtZero:true
                      }
                  }]
              }
          }
      });